/**
 * @ author: 汪孟苹
 */
define(function(require){
	var config = {};

	/**
	 * 根据题型获取该题目的对应的方法
	 */
	config.getQuest = function(key){
		switch(key){
			case "question_group":
				return require('comm/form/component/group/group');
			case "question_groupCollapse":
				return require('comm/form/component/group/groupCollapse');

			case "question_text":
				return require('comm/form/component/base/text');
			case "question_date":
				return require('comm/form/component/base/date');
			case "question_checkbox":
				return require('comm/form/component/base/checkbox');
			case "question_radio":
				return require('comm/form/component/base/radio');
			case "question_select":
				return require('comm/form/component/base/select');
			case "question_textarea":
				return require('comm/form/component/base/textarea');
			case "question_hidden":
				return require('comm/form/component/base/hidden');
			case "question_space":
				return require('comm/form/component/base/space');
			case "question_clear":
				return require('comm/form/component/base/clear');
			case "question_sudoku":
				return require('comm/form/component/base/sudoku');
			case "question_gestation":
				return require('comm/form/component/base/gestation');
			case "question_address":
				return require('comm/form/component/base/address');
			case "question_whz":
				return require('comm/form/component/base/whz');

			case "question_staticText":
				return require('comm/form/component/static/staticText');
			case "question_staticFormat":
				return require('comm/form/component/static/staticFormat');
			case "question_staticAge":
				return require('comm/form/component/static/staticAge');
			case "question_staticAtualAge":
				return require('comm/form/component/static/staticAtualAge');
			case "question_staticGestationalAge":
				return require('comm/form/component/static/staticGestationalAge');
			case "question_staticTextarea":
				return require('comm/form/component/static/staticTextarea');

			case "question_autocomplete":
				return require('comm/form/component/dynamic/autocomplete');
			case "question_calc":
				return require('comm/form/component/dynamic/calc');
			case "question_dynamicSelect":
				return require('comm/form/component/dynamic/dynamicSelect');

			case "question_radioRelation":
				return require('comm/form/component/relation/radioRelation');
			case "question_checkboxRelation":
				return require('comm/form/component/relation/checkboxRelation');

			case "question_getLabelsHidden":
				return require('comm/form/component/other/getLabelsHidden');
		}
	};

	/**
	 * 获取所有题目的题型
	 */
	config.getAllQuestType = function(){
		return [
			"question_group","question_groupCollapse",
			"question_text","question_date","question_checkbox","question_radio","question_select","question_textarea","question_hidden","question_space","question_clear","question_sudoku","question_gestation","question_address","question_whz",
			"question_staticText","question_staticFormat","question_staticAge","question_staticAtualAge","question_staticGestationalAge","question_staticTextarea",
			"question_autocomplete","question_calc","question_dynamicSelect",
			"question_radioRelation","question_checkboxRelation",
			"question_getLabelsHidden",
		];
	}

	return config;
});